<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>clac自动计算div大小</title>
    <style>
        .co{
            width: 900px;
            height: 200px;
            background: brown;
            /* transition: all 5s; */
        }
        .co div:first-child{
            width: calc(100% - 50px);
            height: 100%;
            background: chartreuse;
        }
    </style>
</head>
<body>
    <div class="co">
        <div>dasdsaasdasd</div>
    </div>
</body>
</html>